<html>
<head><meta charset="utf-8"><title>Deferred borrows · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Deferred.20borrows.html">Deferred borrows</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216643695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Deferred%20borrows/near/216643695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Deferred.20borrows.html#216643695">(Nov 13 2020 at 17:24)</a>:</h4>
<p>Some interesting work I wasn't aware of, from Chris Fallin (who works on Cranelift) at ECOOP 2020: "Safe, Flexible Aliasing with Deferred Borrows", here's the <a href="https://cfallin.org/pubs/ecoop2020_defborrow.pdf">paper</a> and <a href="https://www.youtube.com/watch?v=k7mPB5u6mKI">a short video presentation</a></p>
<div class="youtube-video message_inline_image"><a data-id="k7mPB5u6mKI" href="https://www.youtube.com/watch?v=k7mPB5u6mKI"><img src="https://i.ytimg.com/vi/k7mPB5u6mKI/default.jpg"></a></div>



<a name="216652068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Deferred%20borrows/near/216652068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Deferred.20borrows.html#216652068">(Nov 13 2020 at 18:27)</a>:</h4>
<p>origins <em>seem</em> like a better building block than static path-dependent types for some of these use-cases, but are not cited at all which is surprising</p>



<a name="216671494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Deferred%20borrows/near/216671494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Deferred.20borrows.html#216671494">(Nov 13 2020 at 20:53)</a>:</h4>
<p>(and the deferred borrows themselves have somewhat of an "interprocedural 2PBs" quality <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span>)</p>



<a name="216886859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Deferred%20borrows/near/216886859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Deferred.20borrows.html#216886859">(Nov 16 2020 at 15:32)</a>:</h4>
<p>thanks for the reference!</p>



<a name="216919075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Deferred%20borrows/near/216919075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Deferred.20borrows.html#216919075">(Nov 16 2020 at 19:25)</a>:</h4>
<p>you're welcome, just don't <em>borrow it</em> for too long <span aria-label="clown" class="emoji emoji-1f921" role="img" title="clown">:clown:</span></p>



<a name="219661194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Deferred%20borrows/near/219661194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Deferred.20borrows.html#219661194">(Dec 11 2020 at 20:57)</a>:</h4>
<p>is there any relationship between what is being proposed here and two-phase borrows?</p>



<a name="219661271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Deferred%20borrows/near/219661271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Deferred.20borrows.html#219661271">(Dec 11 2020 at 20:58)</a>:</h4>
<p>oh oh <span class="user-mention" data-user-id="116113">@lqd</span> even said that</p>



<a name="219661314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Deferred%20borrows/near/219661314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Deferred.20borrows.html#219661314">(Dec 11 2020 at 20:58)</a>:</h4>
<p>oh oh its <em>interprocedural</em> ?! ( <span aria-label="scream" class="emoji emoji-1f631" role="img" title="scream">:scream:</span> )</p>



<a name="219661669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Deferred%20borrows/near/219661669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Deferred.20borrows.html#219661669">(Dec 11 2020 at 21:01)</a>:</h4>
<p>seemed like they were able to but I could have misinterpreted</p>



<a name="219662706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Deferred%20borrows/near/219662706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Deferred.20borrows.html#219662706">(Dec 11 2020 at 21:11)</a>:</h4>
<p>it seems to me like a mix of 2PB and oxide, as the rules are modifications of oxide — my unfamiliarity with the latter makes me wonder why the root in these deferred borrows isn’t contained in the path described by the loans (could be a difference between oxide and polonius here) and had to be added to the types with a different mechanism</p>



<a name="219663194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Deferred%20borrows/near/219663194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Deferred.20borrows.html#219663194">(Dec 11 2020 at 21:15)</a>:</h4>
<p>maybe I’m misunderstanding and we’ll see in the couple prototypes the author mentioned :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>